from django.contrib import admin
from django.urls import re_path, include
from rest_framework.documentation import include_docs_urls


API_TITLE = 'API Documents'
API_DESCRIPTION = 'API Information'

urlpatterns = [
    # 首页
    re_path(r'^', include('home.urls', namespace='home')),
    # 后台
    re_path(r'^htgl/', admin.site.urls),
    # 接口文档
    re_path(r'^api-auth/', include('rest_framework.urls')),
    # re_path(r'^docs/', include_docs_urls(title=API_TITLE, description=API_DESCRIPTION),),
    re_path(r'^api/', include_docs_urls(title=API_TITLE, description=API_DESCRIPTION)),
    # 接口
    re_path(r'^api/main/', include('app.urls_main', namespace='api')),
    re_path(r'^api/user/', include('app.urls_user', namespace='user')),
    re_path(r'^api/pay/', include('money.urls', namespace='money')),
    re_path(r'^api/product/', include('product.urls', namespace='product')),
    re_path(r'^api/sales/', include('sales.urls', namespace='sales')),
    re_path(r'^api/vip/', include('vip.urls', namespace='vip')),
]
